export default [
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin', 'user'],
    routes: [
      { path: '/', redirect: '/dashboard/analysis' },
      {
        path: '/dashboard',
        name: 'dashboard',
        icon: 'dashboard',
        routes: [
          {
            path: '/dashboard/analysis',
            name: 'analysis',
            component: './Dashboard/Analysis',
          },
          {
            path: '/dashboard/monitor',
            name: 'monitor',
            component: './Dashboard/Monitor',
          },
          {
            path: '/dashboard/workplace',
            name: 'workplace',
            component: './Dashboard/Workplace',
          },
        ],
      },
      // {
      //   path: '/form',
      //   icon: 'form',
      //   name: 'form',
      //   routes: [
      //     {
      //       path: '/form/basic-form',
      //       name: 'basicForm',
      //       component: './Forms/BasicForm',
      //     },
      //     {
      //       path: '/form/step-form',
      //       name: 'stepForm',
      //       component: './Forms/StepForm',
      //       hideChildrenInMenu: true,
      //       routes: [
      //         {
      //           path: '/form/step-form',
      //           // name: 'stepForm',
      //           redirect: '/form/step-form/info',
      //         },
      //         {
      //           path: '/form/step-form/info',
      //           name: 'info',
      //           component: './Forms/StepForm/Step1',
      //         },
      //         {
      //           path: '/form/step-form/confirm',
      //           name: 'confirm',
      //           component: './Forms/StepForm/Step2',
      //         },
      //         {
      //           path: '/form/step-form/result',
      //           name: 'result',
      //           component: './Forms/StepForm/Step3',
      //         },
      //       ],
      //     },
      //     {
      //       path: '/form/advanced-form',
      //       name: 'advancedForm',
      //       authority: ['admin'],
      //       component: './Forms/AdvancedForm',
      //     },
      //   ],
      // },
      {
        path: '/database',
        name: 'database',
        icon: 'database',
        routes: [
          {
            path: '/database/sqlServer',
            name: 'sqlServer',
            component: './SqlServer/OperationPlate',
          },
        ],
      },
      {
        path: '/list',
        icon: 'table',
        name: 'list',
        routes: [
          {
            path: '/list/table-list',
            name: 'searchTable',
            component: './List/TableList',
          },
          {
            path: '/list/basic-list',
            name: 'basicList',
            component: './List/BasicList',
          },
          {
            path: '/list/card-list',
            name: 'cardList',
            component: './List/CardList',
          },
          {
            path: '/list/search',
            name: 'searchList',
            component: './List/List',
            routes: [
              {
                path: '/list/search',
                redirect: '/list/search/articles',
              },
              {
                path: '/list/search/articles',
                name: 'articles',
                component: './List/Articles',
              },
              {
                path: '/list/search/projects',
                name: 'projects',
                component: './List/Projects',
              },
              {
                path: '/list/search/applications',
                name: 'applications',
                component: './List/Applications',
              },
            ],
          },
        ],
      },
      // {
      //   path: '/profile',
      //   name: 'profile',
      //   icon: 'profile',
      //   routes: [
      //     {
      //       path: '/profile/basic',
      //       name: 'basic',
      //       component: './Profile/BasicProfile',
      //     },
      //     {
      //       path: '/profile/advanced',
      //       name: 'advanced',
      //       authority: ['admin'],
      //       component: './Profile/AdvancedProfile',
      //     },
      //   ],
      // },
      // {
      //   name: 'result',
      //   icon: 'check-circle-o',
      //   path: '/result',
      //   routes: [
      //     {
      //       path: '/result/success',
      //       name: 'success',
      //       component: './Result/Success',
      //     },
      //     { path: '/result/fail', name: 'fail', component: './Result/Error' },
      //   ],
      // },
      // {
      //   name: 'exception',
      //   icon: 'warning',
      //   path: '/exception',
      //   routes: [
      //     {
      //       path: '/exception/403',
      //       name: 'not-permission',
      //       component: './Exception/403',
      //     },
      //     {
      //       path: '/exception/404',
      //       name: 'not-find',
      //       component: './Exception/404',
      //     },
      //     {
      //       path: '/exception/500',
      //       name: 'server-error',
      //       component: './Exception/500',
      //     },
      //     {
      //       path: '/exception/trigger',
      //       name: 'trigger',
      //       hideInMenu: true,
      //       component: './Exception/TriggerException',
      //     },
      //   ],
      // },
      // {
      //   name: 'account',
      //   icon: 'user',
      //   path: '/account',
      //   routes: [
      //     {
      //       path: '/account/center',
      //       name: 'center',
      //       component: './Account/Center/Center',
      //       routes: [
      //         {
      //           path: '/account/center',
      //           redirect: '/account/center/articles',
      //         },
      //         {
      //           path: '/account/center/articles',
      //           component: './Account/Center/Articles',
      //         },
      //         {
      //           path: '/account/center/applications',
      //           component: './Account/Center/Applications',
      //         },
      //         {
      //           path: '/account/center/projects',
      //           component: './Account/Center/Projects',
      //         },
      //       ],
      //     },
      //     {
      //       path: '/account/settings',
      //       name: 'settings',
      //       component: './Account/Settings/Info',
      //       routes: [
      //         {
      //           path: '/account/settings',
      //           redirect: '/account/settings/base',
      //         },
      //         {
      //           path: '/account/settings/base',
      //           component: './Account/Settings/BaseView',
      //         },
      //         {
      //           path: '/account/settings/security',
      //           component: './Account/Settings/SecurityView',
      //         },
      //         {
      //           path: '/account/settings/binding',
      //           component: './Account/Settings/BindingView',
      //         },
      //         {
      //           path: '/account/settings/notification',
      //           component: './Account/Settings/NotificationView',
      //         },
      //       ],
      //     },
      //   ],
      // },
      {
        name: 'product',
        icon: 'shop',
        path: '/product',
        routes: [
          {
            path: '/product/list',
            name: 'list',
            component: './Product/List',
          },
          // {
          //   path: '/product/add',
          //   name: 'add',
          //   component: './Product/Add',
          // },
          {
            path: '/product/edit/:op/:id',
            name: 'edit',
            hideInMenu: true,
            component: './Product/Edit',
            routes: [
              {
                path: '/product/edit/:op/:id/basicInfo',
                name: 'basicInfo',
                component: './Product/Edit/BasicInfo',
              },
              {
                path: '/product/edit/:op/:id/contentInfo',
                name: 'contentInfo',
                component: './Product/Edit/ContentInfo',
              },
            ],
          },
          // {
          //   path: '/product/supervise',
          //   name: 'supervise',
          //   routes: [
          //     {
          //       path: '/product/supervise/list',
          //       name: 'list',
          //       component: './Product/List',
          //     },
          //     // {
          //     //   path: '/product/supervise/add',
          //     //   name: 'add',
          //     //   component: './Product/Add',
          //     // },
          //     {
          //       path: '/product/supervise/edit/:op/:id',
          //       name: 'edit',
          //       hideInMenu: true,
          //       component: './Product/Edit',
          //       routes: [
          //         {
          //           path: '/product/supervise/edit/:op/:id/basicInfo',
          //           name: 'basicInfo',
          //           component: './Product/Edit/BasicInfo',
          //         },
          //         {
          //           path: '/product/supervise/edit/:op/:id/contentInfo',
          //           name: 'contentInfo',
          //           component: './Product/Edit/ContentInfo',
          //         },
          //       ],
          //     },
          //   ],
          // },
          // {
          //   path: '/product/config',
          //   name: 'config',
          //   routes: [
          //     {
          //       path: '/product/config/productType',
          //       name: 'productType',
          //       component: './ProductType/List',
          //     },
          //     {
          //       path: '/product/config/customBrand',
          //       name: 'customBrand',
          //       component: './CustomBrand/List',
          //     },
          //     {
          //       path: '/product/config/productUnit',
          //       name: 'productUnit',
          //       component: './ProductUnit/List',
          //     },
          //   ],
          // },
        ],
      },
      {
        name: 'productOrder',
        icon: 'ordered-list',
        path: '/productOrder',
        routes: [
          {
            path: '/productOrder/payment',
            name: 'payment',
            component: './ProductOrder/Payment/List',
          },
          {
            path: '/productOrder/payment/detail/:op/:id',
            name: 'paymentDetail',
            hideInMenu: true,
            component: './ProductOrder/Payment/Detail',
            routes: [
              {
                path: '/productOrder/payment/detail/:op/:id/basicInfo',
                name: 'basicInfo',
                component: './ProductOrder/Payment/Detail/BasicInfo',
              },
            ],
          },
          {
            path: '/productOrder/refund',
            name: 'refund',
            component: './ProductOrder/Refund/List',
          },
          {
            path: '/productOrder/refund/detail/:op/:id',
            name: 'refundDetail',
            hideInMenu: true,
            component: './ProductOrder/Refund/Detail',
            routes: [
              {
                path: '/productOrder/refund/detail/:op/:id/basicInfo',
                name: 'basicInfo',
                component: './ProductOrder/Refund/Detail/BasicInfo',
              },
            ],
          },
          // {
          //   path: '/productOrder/online',
          //   name: 'online',
          //   routes: [
          //     {
          //       path: '/productOrder/online/list',
          //       name: 'list',
          //       component: './ProductOrder/ListOnLine',
          //     },
          //     {
          //       path: '/productOrder/online/detail/:id',
          //       name: 'detail',
          //       hideInMenu: true,
          //       component: './ProductOrder/DetailOnLine',
          //     },
          //   ],
          // },
        ],
      },
      {
        name: 'orderProcessing',
        icon: 'ordered-list',
        path: '/orderProcessing',
        routes: [
          {
            path: '/orderProcessing/list/:status/:tag',
            hideInMenu: true,
            component: './OrderProcessing/List',
          },
          {
            path: '/orderProcessing/list/1/waitDeliver',
            name: 'waitDeliver',
            component: './OrderProcessing/List',
          },
          {
            path: '/orderProcessing/list/2/transit',
            name: 'transit',
            component: './OrderProcessing/List',
          },
          {
            path: '/orderProcessing/list/3/dispatching',
            name: 'dispatching',
            component: './OrderProcessing/List',
          },
          {
            path: '/orderProcessing/list/4/completedCompleted',
            name: 'completedCompleted',
            component: './OrderProcessing/List',
          },
          {
            path: '/orderProcessing/edit/:op/:id',
            name: 'edit',
            hideInMenu: true,
            component: './OrderProcessing/Edit',
            routes: [
              {
                path: '/orderProcessing/edit/:op/:id/basicInfo',
                name: 'basicInfo',
                component: './OrderProcessing/Edit/BasicInfo',
              },
            ],
          },
        ],
      },
      {
        name: 'person',
        icon: 'ordered-list',
        path: '/person',
        routes: [
          {
            path: '/person/listConsumer',
            name: 'listConsumer',
            component: './Consumer/List',
          },
          {
            path: '/person/editConsumer/:op/:id',
            name: 'editConsumer',
            hideInMenu: true,
            component: './Consumer/Edit',
            routes: [
              {
                path: '/person/editConsumer/:op/:id/basicInfo',
                name: 'basicInfo',
                component: './Consumer/Edit/BasicInfo',
              },
              {
                path: '/person/editConsumer/:op/:id/balanceInfo',
                name: 'balanceInfo',
                component: './Consumer/Edit/BalanceInfo',
              },
            ],
          },
          {
            path: '/person/listSaler',
            name: 'listSaler',
            component: './Saler/List',
          },
          {
            path: '/person/editSaler/:op/:id',
            name: 'editSaler',
            hideInMenu: true,
            component: './Saler/Edit',
            routes: [
              {
                path: '/person/editSaler/:op/:id/basicInfo',
                name: 'basicInfo',
                component: './Saler/Edit/BasicInfo',
              },
            ],
          },
        ],
      },
      // {
      //   name: 'stock',
      //   icon: 'profile',
      //   path: '/stock',
      //   routes: [
      //     {
      //       path: '/stock/config',
      //       name: 'config',
      //       routes: [
      //         {
      //           path: '/stock/config/warehouse',
      //           name: 'warehouse',
      //           component: './Warehouse/List',
      //         },
      //       ],
      //     },
      //   ],
      // },
      // {
      //   name: 'channel',
      //   icon: 'share-alt',
      //   path: '/channel',
      //   routes: [
      //     {
      //       path: '/channel/supervise',
      //       name: 'supervise',
      //       routes: [
      //         {
      //           path: '/channel/supervise/customerLevel',
      //           name: 'customerLevel',
      //           component: './CustomerLevel/List',
      //         },
      //         {
      //           path: '/channel/supervise/debtType',
      //           name: 'debtType',
      //           component: './DebtType/List',
      //         },
      //       ],
      //     },
      //   ],
      // },
      {
        component: '404',
      },
    ],
  },
];
